#include "Comm.hpp"
#pragma once

class Cilent

{
public:
    Cilent(int fd = gdefaultfd)
        : _fd(fd)
    {
    }
    bool OpenForWrite()
    {
        _fd = OpenPipeFile(gForwriteopen);
        if (_fd < 0)
            return false;
        return true;
    }
    int SendPipe(std::string &in)
    {
        return ::write(_fd, in.c_str(), in.size());
    }
    void ClosePipe()
    {
        ClosePipeHelper(_fd);
    }
    ~Cilent() {

    };

private:
    int _fd;
};
